<?php
	class elements
	{
		var $id_elements, $id_users, $creation_date, $change_date, $id_projects, $last_element, $data;
		
		public function __construct($id_elements)
		{
			global $db;

			$results = $db->query("select * from elements where id_elements='".$id_elements."' LIMIT 1");
			$data = $db->fetch($results);
			
			$this->id_elements = (int) $data["id_elements"];
			$this->id_users = (int) $data["id_users"];
			$this->creation_date = (int) $data["creation_date"];
			$this->change_date = (int) $data["change_date"];
			$this->id_projects = (int) $data["id_projects"];
			$this->last_element = (int) $data["last_element"];
			$this->data = $data["data"];
			
		}
	}
?>